﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using internal_website.Meta;
using internal_website.Models.Resources;

namespace internal_website.Models
{
    public class Composition : IComposition
    {
        #region Constructor

        public Composition()
        {
            EventCompositions = new Collection<EventComposition>();
            Instruments = new Collection<Instrument>();
        }

        #endregion

        [Key]
        public int Id { get; set; }
        public bool Active { get; set; }


        /*        #region Localized display and model validation attributes
        [Display(Name = "Composition_Name_Display_Name", Prompt = "Composition_Name_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Composition_Name_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Name_LocalizedRegex_Pattern", "Composition_Name_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        */
        public string Name { get; set; }

        /*        #region Localized display and model validation attributes
        [Display(Name = "Composition_Description_Display_Name", Prompt = "Composition_Description_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Composition_Description_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Description_LocalizedRegex_Pattern", "Composition_Description_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        */
        public string Description { get; set; }
        //public TimeSpan Durata { get; set; }

        #region Navigation properties

        public virtual Composer Composer { get; set; }
        public virtual Composer Genre { get; set; }
        public virtual ICollection<EventComposition> EventCompositions { get; set; }
        public virtual ICollection<Instrument> Instruments { get; set; }

        #endregion

    }
}